USE [Training]
GO

IF NOT EXISTS (SELECT * from dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.training_api_SkillSetSelect'))
	EXEC('CREATE PROC dbo.training_api_SkillSetSelect AS')
GO

ALTER PROC dbo.training_api_SkillSetSelect
	@SkillSetID	int = null
AS	
	SELECT
		SkillSetID,
		Title
	FROM
		SkillSet
	WHERE
		(@SkillSetID IS NULL OR(SkillSetID = @SkillSetID))
	ORDER BY
		Title	
